/*var D=new Function('obj','return document.getElementById(obj);')
var oevent=new Function('e','if (!e) e = window.event;return e')
function Move_obj(obj){
	var x,y;
	D(obj).onmousedown=function(e){
		drag_=true;
		with(this){
			style.position="absolute";var temp1=offsetLeft;var temp2=offsetTop;
			x=oevent(e).clientX;y=oevent(e).clientY;
			document.onmousemove=function(e){
				if(!drag_)return false;
				with(this){
					style.left=temp1+oevent(e).clientX-x+"px";
					style.top=temp2+oevent(e).clientY-y+"px";
				}
			}
		}
		document.onmouseup=new Function("drag_=false");
	}
}
*/
function getEvent(e){
	if (!e) 
		e = window.event;
	return e;
}
function Drag(name){
	var obj = document.getElementById(name);
	obj.onmousedown=function(e){
		this.drag_=true;
		with(this){
			style.position="absolute";var temp1=offsetLeft;var temp2=offsetTop;
			x=getEvent(e).clientX;y=getEvent(e).clientY;
			document.onmousemove=function(e){
				if(!drag_)return false;
				with(this){
					style.left=temp1+getEvent(e).clientX-x+"px";
					style.top=temp2+getEvent(e).clientY-y+"px";
				}
			}
		}
	}
	obj.onmouseup=function(){
		this.drag_ = false;
	}
}
